﻿<%@ Control Language="VB" AutoEventWireup="false" CodeFile="SelfAddWorkHeader.ascx.vb"
    Inherits="WebForm_SelfManageWorkHeader_SelfAddWorkHeader" %>
<%@ Register Assembly="CheckBoxRequireControl" Namespace="CheckBoxRequireControl"
    TagPrefix="cc1" %>
<%@ Register src="~/WebForm/CommonControl/UploadPicControl.ascx" tagname="UploadPicControl" tagprefix="uc1" %>
<%@ Register Src="~/Public/VerificationCode.ascx" TagName="VerificationCode" TagPrefix="My" %>
<%@ Reference Control="~/Public/VerificationCode.ascx" %>
<%@ Register Namespace="Tooltip" Assembly="Tooltip" TagPrefix="tt" %>  
<asp:FormView ID="fv" runat="server" DefaultMode="ReadOnly">
    <ItemTemplate>
        <table width="100%" align="center">
            <tr>
                <td align="right" width="80px">
                    
                </td> 
                <td>
                    <asp:Label ID="lblMemoDescription" Font-Bold="true" runat="server" meta:resourcekey="lblMemoDescription"></asp:Label>
                </td>
            </tr>
            <tr id="trRandomCasePassword" runat="server">
                <td align="right" style="background-color:LightBlue">
                    <asp:Label ID="lblRandomCasePassword" runat="server" meta:resourcekey="lblRandomCasePassword"></asp:Label>
                </td>
                <td>
                    <asp:Label ID="lblRandomCasePasswordValue" runat="server"></asp:Label>
                    <asp:TextBox ID="txtRandomCasePassword" MaxLength="50" Visible="false"  Enabled="false" runat="server" Text='<%# Eval("RandomCasePassword") %>'></asp:TextBox>
                    <asp:Label ID="lblReCasePassword" runat="server" meta:resourcekey="lblReCasePassword"></asp:Label>
                </td>
            </tr>
            <tr id="trCasePassword" runat="server">
                <td align="right" style="background-color:LightBlue">
                    <asp:Label ID="lblCasePassword" runat="server" meta:resourcekey="lblCasePassword"></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="txtCasePassword" MaxLength="50" Visible="false" Enabled="false" runat="server" Text='<%# Eval("CasePassword") %>'></asp:TextBox>
                    <asp:Label ID="lblCasePasswordValue" runat="server"></asp:Label>
                </td>
            </tr>
            <tr>
                <td align="right" style="background-color:LightBlue">
                    <asp:Label ID="lblCreateBy" runat="server" meta:resourcekey="lblCreateBy"></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="txtCreateBy" runat="server" MaxLength="50" Text='<%# Eval("CreateBy") %>'></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td align="right" style="background-color:LightBlue">
                    <asp:Label ID="lblCreateTel" runat="server" meta:resourcekey="lblCreateTel"></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="txtCreateTel" runat="server" MaxLength="50" Text='<%# Eval("CreateTel") %>'></asp:TextBox>
                    </td>
            </tr>
            <tr>
                <td align="right" style="background-color:LightBlue">
                    <asp:Label ID="lblCreateEmail" runat="server" meta:resourcekey="lblCreateEmail"></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="txtCreateEmail" MaxLength="100" runat="server" Text='<%# Eval("CreateEmail") %>' Width="350px"></asp:TextBox>
<%--                    <asp:RequiredFieldValidator ID="RequiredFieldValidator5" meta:resourcekey="rfvCreateEmail" runat="server" ControlToValidate="txtCreateEmail"
                        Display="None" SetFocusOnError="True" ValidationGroup="vInsert"></asp:RequiredFieldValidator>
--%>                    <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="txtCreateEmail"
                        Display="None" meta:resourcekey="ErrorEmail" SetFocusOnError="True" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"
                        ValidationGroup="vInsert"></asp:RegularExpressionValidator>
                </td>
            </tr>
            <tr>
                <td align="right" style="background-color:LightBlue">
                    <asp:Label ID="lblRegionType" runat="server" meta:resourcekey="lblRegionType"></asp:Label>
                </td>
                <td>
                    <table>
                        <tr>
                            <td>
                                <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                                    <ContentTemplate>
                                        <asp:RadioButtonList ID="rboRegionType" runat="server" RepeatColumns="3" RepeatDirection="Horizontal" AutoPostBack="True" OnSelectedIndexChanged="rboRegionType_SelectedIndexChanged">
                                        </asp:RadioButtonList>
                                    </ContentTemplate>
                                </asp:UpdatePanel>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Conditional">
                                    <ContentTemplate>
                                        <asp:TextBox ID="txtOtherRegionType" Visible="false" runat="server"></asp:TextBox>
                                    </ContentTemplate>
                                    <Triggers>
                                        <asp:AsyncPostBackTrigger ControlID="rboRegionType" EventName="SelectedIndexChanged" />
                                    </Triggers>
                                </asp:UpdatePanel>
                            </td>
                        </tr>
                    </table>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="rboRegionType"
                        Display="None" meta:resourcekey="rfvRegionType" SetFocusOnError="True" ValidationGroup="vInsert"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td align="right" style="background-color:LightBlue">
                    <asp:Label ID="lblLocation" runat="server" meta:resourcekey="lblLocation"></asp:Label>
                </td>
                <td>
                    <asp:UpdatePanel ID="upTownID" runat="server" UpdateMode="Conditional">
                        <ContentTemplate>
                            <table border="0" cellpadding="0" cellspacing="0">
                                <tr>
                                    <td>
                                        <asp:DropDownList ID="ddlTownID" runat="server" OnSelectedIndexChanged="ddlTownID_SelectedIndexChanged"
                                            AutoPostBack="true">
                                        </asp:DropDownList>
                                        <asp:HyperLink ID="hlinkDescription" SkinID="Description" runat="server" NavigateUrl="~/Public/Description/Location.html"></asp:HyperLink>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <asp:DropDownList ID="ddlRoadID" Visible="false" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlRoadID_SelectedIndexChanged">
                                        </asp:DropDownList>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <asp:DropDownList ID="ddlRoadItem" Visible="false" runat="server">
                                        </asp:DropDownList>
                                        <asp:Label ID="lblRoadItemDescription" Visible="true" runat="server" SkinID="tip" meta:resourcekey="lblRoadItemDescription"></asp:Label>
                                    </td>
                                </tr>
                            </table>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" meta:resourcekey="rfvTownID" runat="server" ControlToValidate="ddlTownID"
                                Display="None" SetFocusOnError="True" ValidationGroup="vInsert"></asp:RequiredFieldValidator>
                        </ContentTemplate>
                        <Triggers>
                            <asp:AsyncPostBackTrigger ControlID="rboRegionType" EventName="SelectedIndexChanged" />
                        </Triggers>
                    </asp:UpdatePanel>
                </td>
            </tr>
            <tr>
                <td align="right" style="background-color:LightBlue">
                    <asp:Label ID="lblLocationDetail" runat="server" meta:resourcekey="lblLocationDetail"></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="txtLocation" MaxLength="50" runat="server" Width="350px" Text='<%# Eval("Location") %>'></asp:TextBox>
                    <br/>
                    <asp:Label ID="lblLocationDescription" runat="server" SkinID="tip" meta:resourcekey="lblLocationDescription"></asp:Label>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" meta:resourcekey="rfvLocation" runat="server" ControlToValidate="txtLocation"
                                Display="None" SetFocusOnError="True" ValidationGroup="vInsert"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td align="right" style="background-color:LightBlue">
                    <asp:Label ID="lblReportDate" runat="server" meta:resourcekey="lblReportDate"></asp:Label>
    			      <tt:TooltipExtender 
					    id="TooltipExtender5" 
					    TargetControlID="lblReportDate" 
					    runat="server"
					    Delay="1"
					    Direction="Bottom"
					    TooltipWidth="225"
					    >
					    <TooltipTemplate>
                            <asp:Label ID="lblReportDateDescription" runat="server" SkinID="tip" meta:resourcekey="lblReportDateDescription"></asp:Label>
					    </TooltipTemplate>
				      </tt:TooltipExtender>
                </td>
                <td>
                    <asp:Label ID="lblReportDateValue" runat="server"></asp:Label>
                    <asp:TextBox ID="txtReportDate" Visible="false" Enabled="false" runat="server" Text='<%#Bind("ReportDate") %>'></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator3" meta:resourcekey="rfvReportDate" runat="server" ControlToValidate="txtReportDate"
                    Display="None" SetFocusOnError="True" ValidationGroup="vInsert"></asp:RequiredFieldValidator>
                    <ajaxToolkit:CalendarExtender ID="ceReportDate" runat="server" Format="yyyy/MM/dd" TargetControlID="txtReportDate">
                    </ajaxToolkit:CalendarExtender>
                    <asp:CompareValidator meta:resourcekey="cvReportDate" ID="cvReportDate" runat="server" ControlToValidate="txtReportDate" Display="None"
                        Operator="DataTypeCheck" SetFocusOnError="True" Type="Date" ValidationGroup="vInsert"></asp:CompareValidator>
                </td>
            </tr>
            <tr>
                <td align="right" style="background-color:LightBlue">
                    <asp:Label ID="lblTopic" runat="server" meta:resourcekey="lblTopic"></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="txtTopic" MaxLength="50" runat="server" Width="350px" Text='<%#Bind("Topic") %>'></asp:TextBox>
                    <asp:RequiredFieldValidator ID="rfvTopic" meta:resourcekey="rfvTopic" runat="server" ControlToValidate="txtTopic"
                    Display="None" SetFocusOnError="True" ValidationGroup="vInsert"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td align="right" style="background-color:LightBlue">
                    <asp:Label ID="lblDirtyItem" runat="server" meta:resourcekey="lblDirtyItem"></asp:Label>
                </td>
                <td>
                    <My:MyGridView ID="gvDirtyItem" SkinID="pager" AllowPaging="false" runat="server" AllowHoverSelect="false"
                        AllowHoverEffect="false" ShowHeader="false" DataKeyNames="DirtyItemID">
                        <Columns>
                            <asp:TemplateField>
                                <itemtemplate>
                                    <asp:CheckBox id="chkDirtyItemName" Text='<%# Eval("DirtyItemName") %>' runat="server"></asp:CheckBox>
                                    <asp:TextBox id="txtDirtyItemName" width="200px" runat="server" MaxLength="50"></asp:TextBox> 
                                </itemtemplate>
                            </asp:TemplateField>
                            <asp:TemplateField visible="false">
                                <itemtemplate>
                                <asp:TextBox id="txtDirtyLevel" width="40px" runat="server" ValidationGroup="vInsert" MaxLength="4"></asp:TextBox> 
                                <asp:CompareValidator meta:resourcekey="cvDirtyLevel" ID="cvDirtyLevel" runat="server" ControlToValidate="txtDirtyLevel" Display="None"
                                    Operator="DataTypeCheck" SetFocusOnError="True" Type="Integer" ValidationGroup="vInsert"></asp:CompareValidator>
                                <asp:Label runat="server" meta:resourcekey="lblDirtyPlaceCount"></asp:Label>
                                </itemtemplate>
                            </asp:TemplateField>
                        </Columns>
                    </My:MyGridView>
                </td>
            </tr>
            <tr>
                <td align="right" style="background-color:LightBlue">
                    <asp:Label ID="lblDescription" runat="server" meta:resourcekey="lblDescription"></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="txtDescription" TextMode="MultiLine" Width="350px" MaxLength="500" Rows="5" runat="server" Text='<%#Bind("Description") %>'></asp:TextBox>
                    <asp:RegularExpressionValidator ID="revDescription" runat="server" SetFocusOnError="true" 
                        ControlToValidate="txtDescription" ValidationExpression="[\s\S]{0,500}" Display="None" ValidationGroup="vInsert"
                        ErrorMessage="髒亂描述字數請勿超過500個字!!">
                    </asp:RegularExpressionValidator>
                    <asp:RequiredFieldValidator ID="rfvDescription" meta:resourcekey="rfvDescription" runat="server" ControlToValidate="txtDescription"
                    Display="None" SetFocusOnError="True" ValidationGroup="vInsert"></asp:RequiredFieldValidator>
                    <br/>
                    <asp:Label ID="lblDirtyDescription" runat="server" SkinID="tip" meta:resourcekey="lblDirtyDescription"></asp:Label>
                </td>
            </tr>            
            <tr>
                <td align="right" style="background-color:LightBlue">
                    <asp:Label ID="lblPicture" runat="server" meta:resourcekey="lblPicture"></asp:Label>               
                </td>
                <td align="left">
                    <table width="100%">
                        <tr>
                            <td align="left">
                                <asp:LinkButton ID="lbtnUploadA" runat="server" meta:resourcekey="lbtnUploadA"></asp:LinkButton>
                                &nbsp;<asp:LinkButton ID="lbtnUploadB" runat="server" meta:resourcekey="lbtnUploadB"></asp:LinkButton>
                            </td>
                            <td align="right">
                                <asp:HyperLink ID="HyperLink1" SkinID="Description" runat="server" NavigateUrl="~/Public/Description/Picture.html"></asp:HyperLink>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr runat="server" id="trVerificationCode">
                <td align="right" style="background-color:LightBlue">
                    <asp:Label ID="lblVerificationCode" runat="server" meta:resourcekey="lblVerificationCode"></asp:Label>
    			      <tt:TooltipExtender 
					    id="TooltipExtender1" 
					    TargetControlID="lblVerificationCode" 
					    runat="server"
					    Delay="1"
					    Direction="Bottom"
					    TooltipWidth="200"
					    >
					    <TooltipTemplate>
                            <asp:Label ID="lblVerificationCodeDescription" runat="server" SkinID="tip" meta:resourcekey="lblVerificationCodeDescription"></asp:Label>
					    </TooltipTemplate>
				      </tt:TooltipExtender>
                </td>
                <td>
                    <asp:TextBox ID="txtVerificationCode" runat="server" SkinID="upper"></asp:TextBox>
                    <My:VerificationCode ID="VerificationCode1" runat="server" /><asp:Label ID="lblCodeDescription" runat="server" meta:resourcekey="lblCodeDescription"></asp:Label>
                    <asp:RequiredFieldValidator ID="rfvVerificationCode" runat="server" ControlToValidate="txtVerificationCode"
                    Display="None" meta:resourcekey="rfvVerificationCode" SetFocusOnError="True" ValidationGroup="vInsert">*</asp:RequiredFieldValidator>
                </td>
            </tr>
        </table>
        <table width="100%">
            <tr>
                <td align="center">
                    <asp:ImageButton ID="btnSave" ImageUrl="~/images/image/but_06.jpg" CommandName="btnSave" OnClientClick="" ValidationGroup="vInsert" runat="server" />
  
                    <ajaxToolkit:ConfirmButtonExtender ID="cbSave" runat="server" 
                        meta:resourcekey="cbSave" TargetControlID="btnSave">
                    </ajaxToolkit:ConfirmButtonExtender>
                </td>
            </tr>
        </table>
        <asp:ValidationSummary ID="ValidationSummary1" runat="server" ShowMessageBox="True"
            ShowSummary="False" ValidationGroup="vInsert" />
    </ItemTemplate>
</asp:FormView>
